﻿#if !(NETFX_CORE || WINDOWS_PHONE)

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WindowsCommonStorage
{
    internal static class FileNameExtentions
    {
        internal static string GetUniqueName(string path, int count)
        {
            string targetName = string.Format("{0}({1})", path, count);
            if (Directory.Exists(targetName))
            {
                return GetUniqueName(targetName, count++);
            }
            else
            {
                return targetName;
            }
        }
    }
}
#endif